//
//  HZ_Billbaord_tablecell.m
//  HZ_Beautiful_Music
//
//  Created by dllo on 16/4/5.
//  Copyright © 2016年 ui. All rights reserved.
//

#import "HZ_Billbaord_tablecell.h"
#import "UIImageView+WebCache.h"
#import "HZ_songs_Model.h"
@interface HZ_Billbaord_tablecell ()
@property (nonatomic, strong) UIImageView *image;
@property (nonatomic, strong) UIImageView *imageTwo;
@property (nonatomic, strong) UIImageView *imageThree;
@property (nonatomic, strong) UIImageView *imageSix;
@property (nonatomic, strong) UILabel *label;
@property (nonatomic, strong) UILabel *labelTwo;
@property (nonatomic, strong) UILabel *labelThree;
@property (nonatomic, strong) UILabel *labelSix;
@end
@implementation HZ_Billbaord_tablecell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        
        
        
        self.backgroundColor = [UIColor whiteColor];
        
        self.image = [[UIImageView alloc] init];
        
        
        self.image.backgroundColor = [UIColor yellowColor];
        
        
        [self.contentView addSubview:self.image];
        self.imageTwo = [[UIImageView alloc] init];
        
        self.imageTwo.image = [UIImage imageNamed:@"iconfont-heiyuan"];
        _imageTwo.alpha = 0.6;
        [self.contentView addSubview:_imageTwo];
        
        
        self.imageThree = [[UIImageView  alloc] init];
        self.imageThree.image = [UIImage imageNamed:@"22"];
        
        
        [self.contentView addSubview:_imageThree];
        
        self.imageSix = [[UIImageView alloc] init];
        
        self.imageSix.image = [UIImage imageNamed:@"iconfont-jiantou"];
        
        [self.contentView addSubview:self.imageSix];
        self.label = [[UILabel alloc] init];
        
        self.label.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.label];
        
        self.labelTwo = [[UILabel alloc] init];
        _labelTwo.textColor = [UIColor colorWithWhite:0.758 alpha:1.000];
        self.labelTwo.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.labelTwo];
        
        self.labelThree = [[UILabel alloc] init];
        _labelThree.textColor = [UIColor colorWithWhite:0.758 alpha:1.000];
        self.labelThree.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.labelThree];
        
        self.labelSix = [[UILabel alloc] init];
        _labelSix.textColor = [UIColor colorWithWhite:0.758 alpha:1.000];
        self.labelSix.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.labelSix];
        
        
        
    }
    
    
    return self;
    
    
    
    
    
    
    
    
    
}

-(void)layoutSubviews{
    
    
    [super layoutSubviews];
    
    
    self.image.frame = CGRectMake(10, 10, self.bounds.size.width / 4, self.bounds.size.height - 20);
    
    self.imageTwo.frame = CGRectMake(13, self.bounds.size.height - 58, 45, 45);
    
    _imageThree.frame = CGRectMake(self.imageTwo.center.x - 10, self.imageTwo.center.y - 10, 20, 20);
    
    _imageSix.frame = CGRectMake(self.bounds.size.width - 40, self.bounds.size.height / 2 - 23, 40, 40);
    
    self.label.frame = CGRectMake(self.bounds.size.width / 4 + 15, 15, self.bounds.size.width / 2, 30);
    
    self.labelTwo.frame = CGRectMake(self.bounds.size.width / 4 + 15, self.label.frame.origin.y + 35, self.bounds.size.width / 2, 20);
    
    self.labelThree.frame = CGRectMake(self.bounds.size.width / 4 + 15, _labelTwo.frame.origin.y + 25, self.bounds.size.width / 2, 20);
    
    self.labelSix.frame = CGRectMake(self.bounds.size.width / 4 + 15, _labelThree.frame.origin.y + 25, self.bounds.size.width / 2, 20);
}
-(void)setModel:(HZ_refsArray *)model{
    
    _model = model;
    NSLog(@"vvvvv%@", _model.images.pic);
    [self.image sd_setImageWithURL:[NSURL URLWithString:_model.images.pic]];
    _label.text = _model.title;
    
    HZ_songs_Model *songs = _model.songs[0];
    
    NSString *str = [NSString stringWithFormat:@"1.%@", songs.name];
    
    
    
    _labelTwo.text = str;
    HZ_songs_Model *songsr = _model.songs[1];
    NSString *stri = [NSString stringWithFormat:@"2.%@", songsr.name];
    
    _labelThree.text = stri;
    
    HZ_songs_Model *songsrt = _model.songs[2];
    
    NSString *strin = [NSString stringWithFormat:@"3.%@", songsrt.name];
    
    _labelSix.text = strin;
    
    
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
